import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'Home',
    component: () => import('../views/Home/index.vue')
  },
  {
    // 设置接口地址
    path: '/Auth/setApiUrl',
    name: 'login',
    component: (resolve) => require(['../views/Auth/setApiUrl.vue'], resolve)
  },
  {
    //登录
    path: '/Auth/login',
    name: 'login',
    component: (resolve) => require(['../views/Auth/login.vue'], resolve)
  },
  {
    //管理员管理
    path: '/User/userManageList',
    name: 'userManageList',
    component: (resolve) => require(['../views/User/userManageList.vue'], resolve)
  }, {
    //菜单管理
    path: '/Menu/menumanage',
    name: 'menumanage',
    component: (resolve) => require(['../views/Menu/menumanage.vue'], resolve)
  }, {
    //栏目管理
    path: '/Column/columnmanage',
    name: 'columnmanage',
    component: (resolve) => require(['../views/Column/columnmanage.vue'], resolve)
  }, {
    //文章管理
    path: '/Article/articlemanage',
    name: 'articlemanage',
    component: (resolve) => require(['../views/Article/articlemanage.vue'], resolve)
  }, {
    //添加文章
    path: '/Article/addarticle',
    name: 'addarticle',
    component: (resolve) => require(['../views/Article/addarticle.vue'], resolve)
  }, {
    //修改文章
    path: "/Article/editarticle",
    name: "editarticle",
    component: (resolve) => require(['../views/Article/editarticle.vue'], resolve)
  }, {
    //文章分类管理
    path: "/Article/articleCateManage",
    name: "articlecatemanage",
    component: (resolve) => require(['../views/Article/articlecatemanage.vue'], resolve)
  }, {
    //文章标签
    path: "/Article/articleTag",
    name: "articleTag",
    component: (resolve) => require(['../views/Article/articleTag.vue'], resolve)
  },
  {
    //文章评价
    path: "/Article/articleComment",
    name: "articleComment",
    component: (resolve) => require(['../views/Article/articleComment.vue'], resolve)
  },
  {
    //会员管理
    path: '/User/userlist',
    name: 'userlist',
    component: (resolve) => require(['../views/User/userlist.vue'], resolve)
  }, {
    //媒体管理
    path: '/File/filelist',
    name: 'filelist',
    component: (resolve) => require(['../views/File/filelist.vue'], resolve)
  },
  {
    //轮播图管理
    path: '/Ads/adsmanage',
    name: 'adsmanage',
    component: (resolve) => require(['../views/Ads/adsmanage.vue'], resolve)
  },
  {
    //添加轮播图
    path: '/Ads/addads',
    name: 'addads',
    component: (resolve) => require(['../views/Ads/addads.vue'], resolve)
  },
  {
    //修改轮播图
    path: '/Ads/editads',
    name: 'editads',
    component: (resolve) => require(['../views/Ads/editads.vue'], resolve)
  },
  {
    //资源管理
    path: '/Resources/resourcesmanage',
    name: 'resourcesmanage',
    component: (resolve) => require(['../views/Resources/resourcesManage.vue'], resolve)
  },
  {
    //添加资源
    path: '/Resources/addResources',
    name: 'addResources',
    component: (resolve) => require(['../views/Resources/addResources.vue'], resolve)
  },
  {
    //修改资源
    path: '/Resources/editResources',
    name: 'editResources',
    component: (resolve) => require(['../views/Resources/editResources.vue'], resolve)
  }, {
    //资源分类
    path: '/Resources/resourcesCateManage',
    name: 'resourcesCateManage',
    component: (resolve) => require(['../views/Resources/resourcesCateManage.vue'], resolve)
  },
  {
    //留言管理
    path: "/Message/messagemanage",
    name: "messagemanage",
    component: (resolve) => require(['../views/Message/messagemanage.vue'], resolve)
  },
  {
    //设置站点
    path: "/Setting/setting",
    name: 'setting',
    component: (resolve) => require(['../views/Setting/setting.vue'], resolve)
  },
  {
    //其他设置
    path: "/Setting/setSetting",
    name: 'setSetting',
    component: (resolve) => require(['../views/Setting/setSetting.vue'], resolve)
  }, {
    //友链管理
    path: "/Link/linkmanage",
    name: 'linkmanage',
    component: (resolve) => require(['../views/Link/linkmanage.vue'], resolve)
  }, {
    //添加友链
    path: "/Link/addlink",
    name: 'addlink',
    component: (resolve) => require(['../views/Link/addlink.vue'], resolve)
  }, {
    //修改友链
    path: "/Link/editlink",
    name: 'editlink',
    component: (resolve) => require(['../views/Link/editlink.vue'], resolve)
  },
  //---软件商店---
  {
    path: '/soft',
    name: 'soft',
    component: (resolve) => require(['../views/soft/Soft.vue'], resolve)
  },
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router